import sys
import os
from scrapy.cmdline import execute

print(os.path.dirname(os.path.abspath(__file__)))
# 获取项目的绝对路径
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

# 命令执行的模拟
# execute(["scrapy", "crawl", "jobbole"])
execute(["scrapy", "crawl", "juejin"])